package com.hedd.shop.service.impl;

import com.hedd.shop.mapper.OrderMapper;
import com.hedd.shop.pojo.entity.Order;
import com.hedd.shop.pojo.qo.OrderAddQO;
import com.hedd.shop.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ludi
 * @date:2020/9/1 9:53
 * @description
 */
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;
    @Override
    public Integer addOrder(OrderAddQO orderAddQO) {
        return orderMapper.addOrder(orderAddQO);
    }

    @Override
    public List<Order> selectOrdersByUserId(Integer userId) {
        return orderMapper.selectOrdersByUserId(userId);
    }

    @Override
    public Order selectByOrderId(Integer orderId) {
        return orderMapper.selectByOrderId(orderId);
    }
}
